import http from "@/utils/http"
import {host} from '@/config'


export default {
	//注册
	register ({ mobile, password }) {
		return http.post(`${host}/user/register`, { mobile, password })
	},
	// 登录
	login ({ mobile, password }) {
		return http.post(`${host}/user/login`, { mobile, password })
	},
	checkLogIn(){
		return http.get(`${host}/user/checkLogin`)
	},
	getUserInfo(){
		return http.get(`${host}/user/userInfo`)
	},
	getUserProfile(){
		return http.get(`${host}/user/profile`)
	},
	//获取关注/点赞/积分等数据
	getTotalInfo(){
		return http.get(`${host}/user/totalInfo`)
	},
	//获取关注列表
	getFollowList () {
		return http.get(`${host}/follow`)
	},
	//获取地址列表
	getAddressList(){
		return http.get(`${host}/deliveryAddress`)
	},
	//提交地址
	postAddress(addressInfo){
		return http.post(`${host}/deliveryAddress`,addressInfo)
	},
	getPointList(){
		return http.get(`${host}/point/list`)
	},
	//获取城市列表
	getCityList(){
		return http.get(`${host}/sfCity`)
	}
}
